class Person{
    public void eat()
    {
        System.out.println("吃饭");
    }
}
class SouthPerson extends Person{
    public void eat()
    {
        System.out.println("吃米饭");
    }
    public void business(){
        System.out.println("经商");
    }
        }
class NorthPerson extends Person{
    public void eat(){
        System.out.println("吃馒头");
    }
    public void Search(){
        System.out.println("研究");
    }
}
public class DuoTaiTest2 {
    public static void main(String[] args) {
        Person p = new SouthPerson();
        p.eat();
        SouthPerson sp = (SouthPerson) p;
        ((SouthPerson) p).business();
        p = new NorthPerson();
        p.eat();
        NorthPerson  np = (NorthPerson)p;
        np.eat();
        np.Search();

    }
}
